package zuoye1;

import exception.IllegalAgeException;

public class ThorwDemo {
    public static void main(String[] args) {
        Student zs=new Student();
        try {
            zs.setAge(1000);
            System.out.println("年龄为"+zs.getAge());
        } catch (IllegalAgeException e) {
            //e.printStackTrace();
            System.out.println("年龄不合法");
        }

    }
}
